
unset PATH
unset VERBOSE
unset TSTAMP
unset SOURCE_DIRECTORY
unset TARGET_DIRECTORY

if [ $# -eq 0 ]
then
    source /etc/snapshot.conf
elif [ $# -eq 1 ]
then
    source ${1}
else
    /bin/echo 2
fi

if [ ${IS_VERBOSE} ]
then
    VERBOSE=-v
fi
if [ ${IS_MAKE_DIRECTORY} ]
then
    ${MKDIR} --parents "${TARGET_DIRECTORY}"
fi

TSTAMP=`${DATE} +${DATEFMT}`


${RSYNC} ${VERBOSE} --archive --delete --perms --executability --acls --xattrs --owner --group --specials --times "${SOURCE_DIRECTORY}" "${TARGET_DIRECTORY}/${INSTANCE}"
${CP} --archive --link "${TARGET_DIRECTORY}/${INSTANCE}" "${TARGET_DIRECTORY}/${TSTAMP}"

